<script>
  require.config({
    paths: {
      "G2Plot": "https://unpkg.com/@antv/g2plot@2/dist/g2plot.min"
    }
  });
</script>

<style>
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  html, body, div.pyg2plot-plot-container { 
    height: 100%;
    overflow: hidden;
  }
</style>

<div id="{{ plot.plot_id }}" class="pyg2plot-plot-container"></div>

<script>
  require(['G2Plot'], function (G2Plot) {
    var plot_{{ plot.plot_id }} = new G2Plot.{{plot.plot_type}}("{{ plot.plot_id }}", {{ plot.js_options }}); 
    plot_{{ plot.plot_id }}.render();
  });
</script>